package com.aistar.service;

import com.aistar.util.LikedCountDTO;

import java.util.List;

public interface RedisService {

    /**
     * 点赞。状态为1
     * @param likedUserId
     * @param likedPostId
     */
    void saveLiked2Redis(String likedUserId, String likedPostId);

    /**
     * 取消点赞。将状态改变为0
     * @param likedUserId
     * @param likedPostId
     */
    void unlikeFromRedis(String likedUserId, String likedPostId);


    /**
     * 获取Redis中存储的所有点赞数据
     * @return
     */
    List<LikedCountDTO> getLikedCountFromRedis();

    /**
     * 获取Redis中存储的所有点赞数据并从Redis中移除
     * @return
     */
    List<LikedCountDTO> getAndDeleteLikedCountFromRedis();


}
